#ifndef LINEAR_H
#define LINEAR_H

class MyMat3;
class MyVec3;
class MyVec4;

MyVec3 distTwoPoints(MyVec3, MyVec3);

class MyVec3{
    public:
        //Forward References
        float n[3];
        MyVec3(){n[0] = 0; n[1] = 0; n[2] = 0;}
        MyVec3(float x, float y, float z);
        MyVec3 operator +(const MyVec3& c);
        MyVec3 operator -(const MyVec3& c);
        MyVec3 operator *(const MyVec3& c); //Cross product
        MyVec3 operator + (int& c);
        MyVec3 operator - (int& c);
        MyVec3 operator * (int& c);
        MyVec3 operator / (int& c);
        MyVec3 operator + (float& c);
        MyVec3 operator - (float& c);
        MyVec3 operator * (float& c);
        MyVec3 operator / (float& c);
        MyMat3 makeSkew();
        float dot(MyVec3 c);    
        float getMagnitude();
};

class MyVec4{
    public:
        //Forward References
        float n[3];
        MyVec4(){n[0] = 0; n[1] = 0; n[2] = 0; n[3] = 0;}
        MyVec4(float x, float y, float z);
        MyVec4 operator +(const MyVec4& c);
        MyVec4 operator -(const MyVec4& c);
        MyVec4 operator + (int& c);
        MyVec4 operator - (int& c);
        MyVec4 operator * (int& c);
        MyVec4 operator / (int& c);
        MyVec4 operator + (float& c);
        MyVec4 operator - (float& c);
        MyVec4 operator * (float& c);
        MyVec4 operator / (float& c);    
};

class MyMat3{
    public:
        //Forward References
        float n[9];
        MyMat3(){n[0] = 0; n[1] = 0; n[2] = 0; n[3] = 0; n[4] = 0; n[5] = 0; n[6] = 0; n[7] = 0; n[8] = 0;}
        MyMat3(float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz);
        MyMat3 operator +(const MyMat3& c);
        MyMat3 operator -(const MyMat3& c);
        MyMat3 operator *(const MyMat3& c);
        MyVec3 operator *(const MyVec3& c);
        MyMat3 operator +(float& c);
        MyMat3 operator -(float& c);
        MyMat3 operator *(float& c);
        MyMat3 operator /(float& c);
        void printOut();
        //MyVec3 multVec(MyVec3);
        MyMat3 diagInverse();
};

#endif
